package com.zzty.txj1.service.impl;

import com.zzty.txj1.dao.UserEventsDao;
import com.zzty.txj1.entity.UserEvents;
import com.zzty.txj1.service.UserEventsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserEventsServiceImpl implements UserEventsService {
    @Autowired
    private UserEventsDao userEventsDao;
    @Override
    public UserEvents getUserEventsById(UserEvents userEvents) {
        UserEvents userEvents1=userEventsDao.getUserEventsById(userEvents);
        return userEvents1;
    }

    @Override
    public Integer updateUserEvents(UserEvents userEvents) {
        Integer flag=userEventsDao.updateUserEvents(userEvents);
        return flag;
    }

    @Override
    public Integer addUserEvents(UserEvents userEvents) {
        Integer flag=userEventsDao.addUserEvents(userEvents);
        return flag;
    }
    @Override
    public List<UserEvents> getAllUserEvents(){
        List<UserEvents> list =userEventsDao.getAllUserEvents();
        return list;
    }

    @Override
    public UserEvents getUserEventsByUserId(UserEvents userEvents) {
        UserEvents userEvents1=userEventsDao.getUserEventsByUserId(userEvents);
        return userEvents1;
    }
    @Override
    public  List<Integer> getAllUserId() {
        List<Integer> userIdList=userEventsDao.getAllUserId();
        return userIdList;
    }

    @Override
    public Integer deleteUsereventsById(UserEvents userEvents) {
        Integer count=userEventsDao.deleteUsereventsById(userEvents);
        return count;
    }

    @Override
    public Integer updateUserEventsById(UserEvents userEvents) {
        Integer count=userEventsDao.updateUserEventsById(userEvents);
        return count;
    }
}
